package com.killer.pojo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author ：Killer
 * @date ：Created in 20-12-25 下午2:14
 * @description：${description}
 * @modified By：
 * @version: version
 */
@Component//用于将persion类作为bean注入到spring容器中
@ConfigurationProperties(prefix = "person")//将配置文件以person开头的属性注入到该类中
public class Person {

	private Pet pet;

	private Long id;

	private String name;

	public Person(){
		System.out.println("实例化了Person");
	}

	public Pet getPet() {
		return pet;
	}

	public void setPet(Pet pet) {
		this.pet = pet;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
